home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 5 / Skunkware 5.iso / man / cat.1 / gzip.1 < prev    next >
Text File  |  1995-07-25  |  22KB  |  463 lines

  1.  
  2.  
  3.  
  4.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           gzip, gunzip, zcat - compress or expand files
  10.  
  11.      SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  12.           ggggzzzziiiipppp [ ----aaaaccccddddffffhhhhllllLLLLnnnnNNNNrrrrttttvvvvVVVV11119999 ] [----SSSS ssssuuuuffffffffiiiixxxx] [ _n_a_m_e ... ]
  13.           gggguuuunnnnzzzziiiipppp [ ----aaaaccccffffhhhhllllLLLLnnnnNNNNrrrrttttvvvvVVVV ] [----SSSS ssssuuuuffffffffiiiixxxx] [ _n_a_m_e ... ]
  14.           zzzzccccaaaatttt [ ----ffffhhhhLLLLVVVV ] [ _n_a_m_e ... ]
  15.  
  16.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  17.           _G_z_i_p reduces the size of the named files using Lempel-Ziv
  18.           coding (LZ77).  Whenever possible, each file is replaced by
  19.           one with the extension ....ggggzzzz,,,, while keeping the same ownership
  20.           modes, access and modification times.  (The default
  21.           extension is ----ggggzzzz for VMS, zzzz for MSDOS, OS/2 FAT, Windows NT
  22.           FAT and Atari.) If no files are specified, or if a file name
  23.           is "-", the standard input is compressed to the standard
  24.           output.  _G_z_i_p will only attempt to compress regular files.
  25.           In particular, it will ignore symbolic links.
  26.  
  27.           If the compressed file name is too long for its file system,
  28.           _g_z_i_p truncates it.  _G_z_i_p attempts to truncate only the parts
  29.           of the file name longer than 3 characters.  (A part is
  30.           delimited by dots.) If the name consists of small parts
  31.           only, the longest parts are truncated. For example, if file
  32.           names are limited to 14 characters, gzip.msdos.exe is
  33.           compressed to gzi.msd.exe.gz.  Names are not truncated on
  34.           systems which do not have a limit on file name length.
  35.  
  36.           By default, _g_z_i_p keeps the original file name and timestamp
  37.           in the compressed file. These are used when decompressing
  38.           the file with the ----NNNN option. This is useful when the
  39.           compressed file name was truncated or when the time stamp
  40.           was not preserved after a file transfer.
  41.  
  42.           Compressed files can be restored to their original form
  43.           using _g_z_i_p -_d or _g_u_n_z_i_p or _z_c_a_t. If the original name saved
  44.           in the compressed file is not suitable for its file system,
  45.           a new name is constructed from the original one to make it
  46.           legal.
  47.  
  48.           _g_u_n_z_i_p takes a list of files on its command line and
  49.           replaces each file whose name ends with .gz, -gz, .z, -z, _z
  50.           or .Z and which begins with the correct magic number with an
  51.           uncompressed file without the original extension.  _g_u_n_z_i_p
  52.           also recognizes the special extensions ....ttttggggzzzz and ....ttttaaaazzzz as
  53.           shorthands for ....ttttaaaarrrr....ggggzzzz and ....ttttaaaarrrr....ZZZZ respectively.  When
  54.           compressing, _g_z_i_p uses the ....ttttggggzzzz extension if necessary
  55.           instead of truncating a file with a ....ttttaaaarrrr extension.
  56.  
  57.           _g_u_n_z_i_p can currently decompress files created by _g_z_i_p, _z_i_p,
  58.           _c_o_m_p_r_e_s_s, _c_o_m_p_r_e_s_s -_H or _p_a_c_k. The detection of the input
  59.           format is automatic.  When using the first two formats,
  60.  
  61.  
  62.  
  63.      Page 1                                           (printed 7/7/95)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  71.  
  72.  
  73.  
  74.           _g_u_n_z_i_p checks a 32 bit CRC. For _p_a_c_k, _g_u_n_z_i_p checks the
  75.           uncompressed length. The standard _c_o_m_p_r_e_s_s format was not
  76.           designed to allow consistency checks. However _g_u_n_z_i_p is
  77.           sometimes able to detect a bad .Z file. If you get an error
  78.           when uncompressing a .Z file, do not assume that the .Z file
  79.           is correct simply because the standard _u_n_c_o_m_p_r_e_s_s does not
  80.           complain. This generally means that the standard _u_n_c_o_m_p_r_e_s_s
  81.           does not check its input, and happily generates garbage
  82.           output.  The SCO compress -H format (lzh compression method)
  83.           does not include a CRC but also allows some consistency
  84.           checks.
  85.  
  86.           Files created by _z_i_p can be uncompressed by gzip only if
  87.           they have a single member compressed with the 'deflation'
  88.           method. This feature is only intended to help conversion of
  89.           tar.zip files to the tar.gz format. To extract zip files
  90.           with several members, use _u_n_z_i_p instead of _g_u_n_z_i_p.
  91.  
  92.           _z_c_a_t is identical to _g_u_n_z_i_p ----cccc.... (On some systems, _z_c_a_t may
  93.           be installed as _g_z_c_a_t to preserve the original link to
  94.           _c_o_m_p_r_e_s_s.) _z_c_a_t uncompresses either a list of files on the
  95.           command line or its standard input and writes the
  96.           uncompressed data on standard output.  _z_c_a_t will uncompress
  97.           files that have the correct magic number whether they have a
  98.           ....ggggzzzz suffix or not.
  99.  
  100.           _G_z_i_p uses the Lempel-Ziv algorithm used in _z_i_p and PKZIP.
  101.           The amount of compression obtained depends on the size of
  102.           the input and the distribution of common substrings.
  103.           Typically, text such as source code or English is reduced by
  104.           60-70%.  Compression is generally much better than that
  105.           achieved by LZW (as used in _c_o_m_p_r_e_s_s), Huffman coding (as
  106.           used in _p_a_c_k), or adaptive Huffman coding (_c_o_m_p_a_c_t).
  107.  
  108.           Compression is always performed, even if the compressed file
  109.           is slightly larger than the original. The worst case
  110.           expansion is a few bytes for the gzip file header, plus 5
  111.           bytes every 32K block, or an expansion ratio of 0.015% for
  112.           large files. Note that the actual number of used disk blocks
  113.           almost never increases.  _g_z_i_p preserves the mode, ownership
  114.           and timestamps of files when compressing or decompressing.
  115.  
  116.  
  117.      OOOOPPPPTTTTIIIIOOOONNNNSSSS
  118.           ----aaaa --------aaaasssscccciiiiiiii
  119.                Ascii text mode: convert end-of-lines using local
  120.                conventions. This option is supported only on some
  121.                non-Unix systems. For MSDOS, CR LF is converted to LF
  122.                when compressing, and LF is converted to CR LF when
  123.                decompressing.
  124.  
  125.           ----cccc --------ssssttttddddoooouuuutttt --------ttttoooo----ssssttttddddoooouuuutttt
  126.  
  127.  
  128.  
  129.      Page 2                                           (printed 7/7/95)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  137.  
  138.  
  139.  
  140.                Write output on standard output; keep original files
  141.                unchanged.  If there are several input files, the
  142.                output consists of a sequence of independently
  143.                compressed members. To obtain better compression,
  144.                concatenate all input files before compressing them.
  145.  
  146.           ----dddd --------ddddeeeeccccoooommmmpppprrrreeeessssssss --------uuuunnnnccccoooommmmpppprrrreeeessssssss
  147.                Decompress.
  148.  
  149.           ----ffff --------ffffoooorrrrcccceeee
  150.                Force compression or decompression even if the file has
  151.                multiple links or the corresponding file already
  152.                exists, or if the compressed data is read from or
  153.                written to a terminal. If the input data is not in a
  154.                format recognized by _g_z_i_p, and if the option --stdout
  155.                is also given, copy the input data without change to
  156.                the standard ouput: let _z_c_a_t behave as _c_a_t. If ----ffff is
  157.                not given, and when not running in the background, _g_z_i_p
  158.                prompts to verify whether an existing file should be
  159.                overwritten.
  160.  
  161.           ----hhhh --------hhhheeeellllpppp
  162.                Display a help screen and quit.
  163.  
  164.           ----llll --------lllliiiisssstttt
  165.                For each compressed file, list the following fields:
  166.  
  167.                    compressed size: size of the compressed file
  168.                    uncompressed size: size of the uncompressed file
  169.                    ratio: compression ratio (0.0% if unknown)
  170.                    uncompressed_name: name of the uncompressed file
  171.  
  172.                The uncompressed size is given as -1 for files not in
  173.                gzip format, such as compressed .Z files. To get the
  174.                uncompressed size for such a file, you can use:
  175.  
  176.                    zcat file.Z | wc -c
  177.  
  178.                In combination with the --verbose option, the following
  179.                fields are also displayed:
  180.  
  181.                    method: compression method
  182.                    crc: the 32-bit CRC of the uncompressed data
  183.                    date & time: time stamp for the uncompressed file
  184.  
  185.                The compression methods currently supported are
  186.                deflate, compress, lzh (SCO compress -H) and pack.  The
  187.                crc is given as ffffffff for a file not in gzip format.
  188.  
  189.                With --name, the uncompressed name,  date and time  are
  190.                those stored within the compress file if present.
  191.  
  192.  
  193.  
  194.  
  195.      Page 3                                           (printed 7/7/95)
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  203.  
  204.  
  205.  
  206.                With --verbose, the size totals and compression ratio
  207.                for all files is also displayed, unless some sizes are
  208.                unknown. With --quiet, the title and totals lines are
  209.                not displayed.
  210.  
  211.           ----LLLL --------lllliiiicccceeeennnnsssseeee
  212.                Display the _g_z_i_p license and quit.
  213.  
  214.           ----nnnn --------nnnnoooo----nnnnaaaammmmeeee
  215.                When compressing, do not save the original file name
  216.                and time stamp by default. (The original name is always
  217.                saved if the name had to be truncated.) When
  218.                decompressing, do not restore the original file name if
  219.                present (remove only the _g_z_i_p suffix from the
  220.                compressed file name) and do not restore the original
  221.                time stamp if present (copy it from the compressed
  222.                file). This option is the default when decompressing.
  223.  
  224.           ----NNNN --------nnnnaaaammmmeeee
  225.                When compressing, always save the original file name
  226.                and time stamp; this is the default. When
  227.                decompressing, restore the original file name and time
  228.                stamp if present. This option is useful on systems
  229.                which have a limit on file name length or when the time
  230.                stamp has been lost after a file transfer.
  231.  
  232.           ----qqqq --------qqqquuuuiiiieeeetttt
  233.                Suppress all warnings.
  234.  
  235.           ----rrrr --------rrrreeeeccccuuuurrrrssssiiiivvvveeee
  236.                Travel the directory structure recursively. If any of
  237.                the file names specified on the command line are
  238.                directories, _g_z_i_p will descend into the directory and
  239.                compress all the files it finds there (or decompress
  240.                them in the case of _g_u_n_z_i_p ).
  241.  
  242.           ----SSSS ....ssssuuuuffff --------ssssuuuuffffffffiiiixxxx ....ssssuuuuffff
  243.                Use suffix .suf instead of .gz. Any suffix can be
  244.                given, but suffixes other than .z and .gz should be
  245.                avoided to avoid confusion when files are transferred
  246.                to other systems.  A null suffix forces gunzip to  try
  247.                decompression on all given files regardless of suffix,
  248.                as in:
  249.  
  250.                    gunzip -S "" *       (*.* for MSDOS)
  251.  
  252.                Previous versions of gzip used the .z suffix. This was
  253.                changed to avoid a conflict with _p_a_c_k(1).
  254.  
  255.           ----tttt --------tttteeeesssstttt
  256.                Test. Check the compressed file integrity.
  257.  
  258.  
  259.  
  260.  
  261.      Page 4                                           (printed 7/7/95)
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  269.  
  270.  
  271.  
  272.           ----vvvv --------vvvveeeerrrrbbbboooosssseeee
  273.                Verbose. Display the name and percentage reduction for
  274.                each file compressed or decompressed.
  275.  
  276.           ----VVVV --------vvvveeeerrrrssssiiiioooonnnn
  277.                Version. Display the version number and compilation
  278.                options then quit.
  279.  
  280.           ----#### --------ffffaaaasssstttt --------bbbbeeeesssstttt
  281.                Regulate the speed of compression using the specified
  282.                digit #, where ----1111 or --------ffffaaaasssstttt indicates the fastest
  283.                compression method (less compression) and ----9999 or --------bbbbeeeesssstttt
  284.                indicates the slowest compression method (best
  285.                compression).  The default compression level is ----6666
  286.                (that is, biased towards high compression at expense of
  287.                speed).
  288.  
  289.      AAAADDDDVVVVAAAANNNNCCCCEEEEDDDD UUUUSSSSAAAAGGGGEEEE
  290.           Multiple compressed files can be concatenated. In this case,
  291.           _g_u_n_z_i_p will extract all members at once. For example:
  292.  
  293.                 gzip -c file1  > foo.gz
  294.                 gzip -c file2 >> foo.gz
  295.  
  296.           Then
  297.                 gunzip -c foo
  298.  
  299.           is equivalent to
  300.  
  301.                 cat file1 file2
  302.  
  303.           In case of damage to one member of a .gz file, other members
  304.           can still be recovered (if the damaged member is removed).
  305.           However, you can get better compression by compressing all
  306.           members at once:
  307.  
  308.                 cat file1 file2 | gzip > foo.gz
  309.  
  310.           compresses better than
  311.  
  312.                 gzip -c file1 file2 > foo.gz
  313.  
  314.           If you want to recompress concatenated files to get better
  315.           compression, do:
  316.  
  317.                 gzip -cd old.gz | gzip > new.gz
  318.  
  319.           If a compressed file consists of several members, the
  320.           uncompressed size and CRC reported by the --list option
  321.           applies to the last member only. If you need the
  322.           uncompressed size for all members, you can use:
  323.  
  324.  
  325.  
  326.  
  327.      Page 5                                           (printed 7/7/95)
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  335.  
  336.  
  337.  
  338.                 gzip -cd file.gz | wc -c
  339.  
  340.           If you wish to create a single archive file with multiple
  341.           members so that members can later be extracted
  342.           independently, use an archiver such as tar or zip. GNU tar
  343.           supports the -z option to invoke gzip transparently. gzip is
  344.           designed as a complement to tar, not as a replacement.
  345.  
  346.      EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT
  347.           The environment variable GGGGZZZZIIIIPPPP can hold a set of default
  348.           options for _g_z_i_p. These options are interpreted first and
  349.           can be overwritten by explicit command line parameters. For
  350.           example:
  351.                 for sh:    GZIP="-8v --name"; export GZIP
  352.                 for csh:   setenv GZIP "-8v --name"
  353.                 for MSDOS: set GZIP=-8v --name
  354.  
  355.           On Vax/VMS, the name of the environment variable is
  356.           GZIP_OPT, to avoid a conflict with the symbol set for
  357.           invocation of the program.
  358.  
  359.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  360.           znew(1), zcmp(1), zmore(1), zforce(1), gzexe(1), zip(1),
  361.           unzip(1), compress(1), pack(1), compact(1)
  362.  
  363.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  364.           Exit status is normally 0; if an error occurs, exit status
  365.           is 1. If a warning occurs, exit status is 2.
  366.  
  367.           Usage: gzip [-cdfhlLnNrtvV19] [-S suffix] [file ...]
  368.                   Invalid options were specified on the command line.
  369.           _f_i_l_e: not in gzip format
  370.                   The file specified to _g_u_n_z_i_p has not been
  371.                   compressed.
  372.           _f_i_l_e: Corrupt input. Use zcat to recover some data.
  373.                   The compressed file has been damaged. The data up to
  374.                   the point of failure can be recovered using
  375.                           zcat file > recover
  376.           _f_i_l_e: compressed with _x_x bits, can only handle _y_y bits
  377.                   _F_i_l_e was compressed (using LZW) by a program that
  378.                   could deal with more _b_i_t_s than the decompress code
  379.                   on this machine.  Recompress the file with gzip,
  380.                   which compresses better and uses less memory.
  381.           _f_i_l_e: already has .gz suffix -- no change
  382.                   The file is assumed to be already compressed.
  383.                   Rename the file and try again.
  384.           _f_i_l_e already exists; do you wish to overwrite (y or n)?
  385.                   Respond "y" if you want the output file to be
  386.                   replaced; "n" if not.
  387.           gunzip: corrupt input
  388.                   A SIGSEGV violation was detected which usually means
  389.                   that the input file has been corrupted.
  390.  
  391.  
  392.  
  393.      Page 6                                           (printed 7/7/95)
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.      GGGGZZZZIIIIPPPP((((1111))))               UUUUNNNNIIIIXXXX SSSSyyyysssstttteeeemmmm VVVV ((((llllooooccccaaaallll))))               GGGGZZZZIIIIPPPP((((1111))))
  401.  
  402.  
  403.  
  404.           _x_x._x%
  405.                   Percentage of the input saved by compression.
  406.                   (Relevant only for ----vvvv and ----llll.)
  407.           -- not a regular file or directory: ignored
  408.                   When the input file is not a regular file or
  409.                   directory, (e.g. a symbolic link, socket, FIFO,
  410.                   device file), it is left unaltered.
  411.           -- has _x_x other links: unchanged
  412.                   The input file has links; it is left unchanged.  See
  413.                   _l_n(1) for more information. Use the ----ffff flag to force
  414.                   compression of multiply-linked files.
  415.  
  416.      CCCCAAAAVVVVEEEEAAAATTTTSSSS
  417.           When writing compressed data to a tape, it is generally
  418.           necessary to pad the output with zeroes up to a block
  419.           boundary. When the data is read and the whole block is
  420.           passed to _g_u_n_z_i_p for decompression, _g_u_n_z_i_p detects that
  421.           there is extra trailing garbage after the compressed data
  422.           and emits a warning by default. You have to use the --quiet
  423.           option to suppress the warning. This option can be set in
  424.           the GGGGZZZZIIIIPPPP environment variable as in:
  425.             for sh:  GZIP="-q"  tar -xfz --block-compress /dev/rst0
  426.             for csh: (setenv GZIP -q; tar -xfz --block-compr /dev/rst0
  427.  
  428.           In the above example, gzip is invoked implicitly by the -z
  429.           option of GNU tar. Make sure that the same block size (-b
  430.           option of tar) is used for reading and writing compressed
  431.           data on tapes.  (This example assumes you are using the GNU
  432.           version of tar.)
  433.  
  434.      BBBBUUUUGGGGSSSS
  435.           The --list option reports incorrect sizes if they exceed 2
  436.           gigabytes.  The --list option reports sizes as -1 and crc as
  437.           ffffffff if the compressed file is on a non seekable media.
  438.  
  439.           In some rare cases, the --best option gives worse
  440.           compression than the default compression level (-6). On some
  441.           highly redundant files, _c_o_m_p_r_e_s_s compresses better than
  442.           _g_z_i_p.
  443.  
  444.  
  445.  
  446.  
  447.  
  448.  
  449.  
  450.  
  451.  
  452.  
  453.  
  454.  
  455.  
  456.  
  457.  
  458.  
  459.      Page 7                                           (printed 7/7/95)
  460.  
  461.  
  462.  
  463.